package org.openProcess;

import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import org.window.App;

/**
 * 进程列表地址
 */
public class StageWindowsProcess {
    public static Stage stage = new Stage();
    public static void init(){
        stage.initOwner(App.stage);
        stage.initModality(Modality.WINDOW_MODAL);
        stage.setAlwaysOnTop(true);
        stage.setResizable(false);
        stage.setTitle("选择进程- 左键双击确认/右键双击刷新");
        stage.setWidth(300);
        stage.setHeight(500);
        stage.hide();
        stage.setScene(new Scene(StageWindowsProcessPane.pane));
        StageWindowsProcessPane.init();
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent event) {
                stage.hide();
            }
        });
    }
}
